<?php
header("content-type:text/html;charset=utf-8");

require_once './WeChat.class.php';
require_once './Curl.class.php';
$config=require_once './config.php';
$app_id=$config['id'];
$app_secret=$config['secret'];
$weChat=new WeChat($app_id,$app_secret);
//echo $weChat->checkSignature("bus123");//服务器配置

//$weChat->doResponse();

//$weChat->getQR(3,1234);
//echo $weChat->getTicket(0,1234);
//echo $weChat->getAccessToken();
//$weChat->addMedia();
//echo $weChat->uploadTempMedia('./3.jpg');
//echo $weChat->uploadTempMedia('./m.mp3');
//$weChat->clearQuota('wxfe7927ebbe6ef42a');
////echo '';
//
$menu=include 'menu.php';
echo "微校巴士创建菜单:";
echo $app_id;
var_dump($weChat->createMenu($menu));
echo "<h1>新菜单</h1><pre>";
var_dump($weChat->getMenu());
//
//$res=$weChat->getMenu();
//var_dump($res);
//$res=$weChat->delMenu();
//var_dump($res);